﻿@model DTcms.Model.BaseModel
@{
    ViewBag.Title = "收货地址-" + Model.site.seo_title;
    string action = Model.info["action"].ToString();
    var m = (DTcms.Model.user_addr_book)Model.info["model"];
}
@section HeaderContent{
    <script type="text/javascript" charset="utf-8" src="/scripts/jquery/PCASClass.js"></script>
    <link href="/template/pc/main/default/skin/dragcode.css" rel="stylesheet" />
}
<!--当前位置-->
<div class="section">
    <div class="location">
        <span>当前位置：</span>
        <a href="@Html.linkurl("index")">首页</a> &gt;
        <a href="@Html.linkurl("usercenter","index")">会员中心</a>
        <a href="@Html.linkurl("usermessage","list")">站内短消息</a>
    </div>
</div>
<!--/当前位置-->

<div class="section clearfix">
    <!--页面左边-->
    @Html.Partial("_ucenter_nav")
    <!--/页面左边-->
    <!--页面左边-->
    <div class="right-auto">
        <div class="bg-wrap" style="min-height:765px;">
            <div class="sub-tit">
                <a class="add" href="javascript:history.back();"><i class="iconfont icon-reply"></i>返回</a>
                <ul>
                    <li class="selected">
                        <a href="@Html.linkurl("useraddress")">收货地址</a>
                    </li>
                </ul>
            </div>
            <form id="editForm" name="editForm" url="/api/lisence_ajax/user_address_edit">
                <input name="id" type="hidden" value="@m.id" />
                <div class="form-box">
                    <dl class="form-group">
                        <dt>收件人姓名：</dt>
                        <dd>
                            <input name="txtAcceptName" id="txtAcceptName" type="text" class="input" value="@m.accept_name" datatype="s1-50" nullmsg="请填写收件人用户名" sucmsg=" " />
                        </dd>
                    </dl>
                    <dl class="form-group">
                        <dt>所属地区：</dt>
                        <dd>
                            <select id="txtProvince" name="txtProvince" class="select"></select>
                            <select id="txtCity" name="txtCity" class="select"></select>
                            <select id="txtArea" name="txtArea" class="select" datatype="*" nullmsg="请选择所属地区" sucmsg=" "></select>
                        </dd>
                    </dl>
                    <dl class="form-group">
                        <dt>详细地址：</dt>
                        <dd>
                            <input name="txtAddress" id="txtAddress" type="text" class="input" value="@m.address" datatype="*1-255" nullmsg="请填写详细地址" sucmsg=" " />
                        </dd>
                    </dl>
                    <dl class="form-group">
                        <dt>手机号码：</dt>
                        <dd>
                            <input name="txtMobile" id="txtMobile" type="text" class="input" value="@m.mobile" datatype="m" nullmsg="请填写手机号码" sucmsg=" " />
                        </dd>
                    </dl>
                    <dl class="form-group">
                        <dt>联系电话：</dt>
                        <dd>
                            <input name="txtTelphone" id="txtTelphone" type="text" class="input" value="@m.telphone" maxlength="30" datatype="*0-20" sucmsg=" " />
                        </dd>
                    </dl>
                    <dl class="form-group">
                        <dt>电子邮箱：</dt>
                        <dd>
                            <input name="txtEmail" id="txtEmail" type="text" class="input" value="@m.email" datatype="*0-20" sucmsg=" " />
                        </dd>
                    </dl>
                    <dl class="form-group">
                        <dt>邮政编码：</dt>
                        <dd>
                            <input name="txtPostCode" id="txtPostCode" type="text" class="input" value="@m.post_code" datatype="n0-10" sucmsg=" " />
                        </dd>
                    </dl>
                    <dl class="form-group">
                        <dt>激&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;活：</dt>
                        <dd>
                            <input type="hidden" name="imgcodeid" id="imgcodeid" />
                            <div class="authcode2017 clearfix">
                                <ul class="authcode_btn" id="authcode_btn">
                                    <li data-val="0">0</li>
                                    <li data-val="1">1</li>
                                    <li data-val="2">2</li>
                                    <li data-val="3">3</li>
                                    <li data-val="4">4</li>
                                    <li data-val="5">5</li>
                                    <li data-val="6">6</li>
                                    <li data-val="7">7</li>
                                    <li data-val="8">8</li>
                                    <li data-val="9">9</li>
                                    <div class="success"><s class="s"></s>激活成功</div>
                                </ul>
                                <span class="authcode_txt">请点击图中“<span id="authcode_txt"></span>”以激活</span>
                                <input name="codeindex" id="codeindex" type="hidden" datatype="code" nullmsg="请点击对应字符激活后提交！" sucmsg=" " />
                                <span class="Validform_checktip"></span>
                            </div>
                        </dd>
                    </dl>
                    <dl class="form-group">
                        <dd>
                            <input id="btnSubmit" name="btnSubmit" type="submit" value="确认提交" class="submit" />
                        </dd>
                    </dl>
                </div>
            </form>
            <input id="turl" type="hidden" value="@Html.linkurl("useraddress")" /><!--存在跳转的URL值-->
        </div>
    </div>
    <!--/页面左边-->
</div>
@section Scripts{
    <script type="text/javascript" src="/template/pc/main/default/js/dragcode2.js"></script>
    <script type="text/javascript">
        layui.use(['validform', 'jqueryform', 'form'], function () {
            $('#imgcodeid').iAuthcode();
            //初始化地区
            var mypcas = new PCAS("txtProvince,所属省份", "txtCity,所属城市", "txtArea,所属地区");
            var areaArr = ("@m.area").split(",");
            if (areaArr.length == 3) {
                mypcas.SetValue(areaArr[0], areaArr[1], areaArr[2]);
            }
            $("#editForm").initValidform('#btnSubmit', 1, '#turl');
        });
    </script>
}